CREATE TABLE [dbo].[TDDIST_COCO]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_COMP_COBR] [dbo].[TD_VC_003] NOT NULL,
[NU_COMP_COBR] [dbo].[TD_VC_008] NOT NULL,
[NU_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDDIST_CO__NU_CO__347EC10E] DEFAULT ((0)),
[TI_AUXI_EMPR] [dbo].[TD_VC_001] NULL,
[CO_AUXI_EMPR] [dbo].[TD_VC_020] NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[CO_ORDE_SERV] [dbo].[TD_VC_020] NULL,
[ST_DIST] [dbo].[TD_VC_001] NOT NULL,
[PO_DIST] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TDDIST_CO__PO_DI__3572E547] DEFAULT ((0)),
[IM_CUOT_DIST] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDDIST_CO__IM_CU__36670980] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDDIST_CO__CO_US__375B2DB9] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDDIST_CO__FE_US__384F51F2] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDDIST_CO__CO_US__3943762B] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDDIST_CO__FE_US__3A379A64] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDDIST_COCO] ADD CONSTRAINT [PK__TDDIST_C__131C4E955788D180] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_COMP_COBR], [NU_COMP_COBR], [NU_CORR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDDIST_COCO] ADD CONSTRAINT [FK__TDDIST_COCO__4B0DEC02] FOREIGN KEY ([CO_EMPR], [TI_COMP_COBR], [NU_COMP_COBR]) REFERENCES [dbo].[TCCOMP_COBR] ([CO_EMPR], [TI_COMP_COBR], [NU_COMP_COBR])
GO
